﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace Amoo.Visualizar
{
    public partial class DetalheNoticia : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {

            if (!Page.IsPostBack)
            {
                int idNoticia = Convert.ToInt32(Request["idNoticia"]);

                if (idNoticia > 0)
                {
                    MontarResumo(idNoticia);
                }
            }

        }

        private void MontarResumo(int pidNoticia)
        {
            Amoo.Code.Data.Noticia oNoticia = new Amoo.Code.Data.Noticia();
            Amoo.Code.Entity.Noticia eNoticia = oNoticia.GetById(new Amoo.Code.Entity.Noticia() { idNoticia = pidNoticia });

            dvDetalheNoticia.InnerHtml = "<font style='font-family:Arial Black; font-size:15px; font-style:italic; color:#FF8112'>" + eNoticia.dsTitulo + "</font><br><br>" + eNoticia.dsHtml;
        }
    }
}
